home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / !applications! / symphonie / dsplugin / dspplugin counter.s < prev    next >
Text File  |  1994-04-11  |  3KB  |  147 lines

  1.     MC68020
  2.  
  3. SST_SYS_GetMem            EQU    0
  4. SST_SYS_FreeMem            EQU    4
  5.  
  6. SST_FILE_RequestFileName    EQU    100
  7. SST_FILE_SetReqPattern        EQU    104
  8. SST_FILE_SetReqDir        EQU    108
  9. SST_FILE_GetFileName        EQU    112
  10. SST_FILE_GetFileLen        EQU    116
  11.  
  12. SST_GFX_AssistText        EQU    200
  13. SST_GFX_AssistDecLong        EQU    204
  14. SST_GFX_AssistDecByte        EQU    208
  15. SST_GFX_AssistHexLong        EQU    212
  16.  
  17. SST_AUDIO_GetChunkLen        EQU    400
  18.  
  19. SST_PTR_EXECBASE        EQU    1600
  20. SST_PTR_INTBASE            EQU    1604
  21. SST_PTR_DOSBASE            EQU    1608
  22. SST_PTR_ASLBASE            EQU    1612
  23. SST_PTR_REQTOOLSBASE        EQU    1616
  24. SST_PTR_GFXBASE            EQU    1620
  25.  
  26. SST_PTR_Screen            EQU    1650
  27.  
  28. SST_ADR_ProcessorFlags        EQU    1800
  29. SST_ADR_SystemFrequency        EQU    1804
  30. SST_ADR_SystemBpm        EQU    1808
  31. SST_ADR_ChunkLen        EQU    1812
  32. SST_ADR_OversampleFlag        EQU    1816
  33. SST_ADR_MaxAmplitude        EQU    1820    ;$7fff in SymPRO
  34. SST_ADR_BitPerSample        EQU    1824    ;16 for 16 Bit Stream
  35.  
  36.  
  37.  
  38.     dc.b    "Symphonie DSP Plugin"    ;MAGIC String    (PRIVATE)
  39.     dc.w    1,0            ;Version,Release (PRIVATE,DO NOT CHANGE)
  40.  
  41.     ;- DSPLIB -------------------------------------------------
  42.  
  43.     jmp    InitDSP(PC)        ;Allocate Mem, Build your Tables
  44.     jmp    CleanUpDSP(PC)        ;Free Mem
  45.  
  46.     jmp    ProcDsp(PC)        ;Process DSP algorithm (interrupt)
  47.  
  48.     jmp    GetDspTitle(PC)        ;Get DSP algorithm Title
  49.     jmp    ModifyValue(PC)        ;notify changed Value
  50.  
  51.     jmp    GraphSizeModify(PC)    ;notify graph size has changed
  52.     jmp    RefreshGraph(PC)    ;notify its time for a GFX update
  53.  
  54.     jmp    StartDSP(PC)        ;notify start
  55.     jmp    StopDSP(PC)        ;notify stop
  56.     dc.l    -1
  57.  
  58.     ;- CODE --------------------------------------------------
  59.  
  60.  
  61. StartDSP
  62.     rts
  63.  
  64. StopDSP
  65.     rts
  66.  
  67. GraphSizeModify
  68.     rts
  69.  
  70. RefreshGraph
  71.     lea.l    Counter(PC),a0
  72.     move.l    (a0),d0
  73.     move.l    4(a0),d1
  74.     cmp.l    d1,d0
  75.     beq.s    RefreshGraph_X
  76.  
  77.     move.l    d0,4(a0)
  78.  
  79.     move.l    #SST_GFX_AssistHexLong,d7
  80.     bsr    GoSST    
  81. RefreshGraph_X
  82.     rts
  83.  
  84. ModifyValue    ;INPUT (D0L,D1L)(VALUE, PARAMETER ID)
  85.     move.l    Counter(PC),d0
  86.     move.l    #SST_GFX_AssistHexLong,d7
  87.     bsr    GoSST    
  88.     rts
  89.  
  90. GoSST
  91.     move.l    a6,-(sp)
  92.     move.l    SUPERSTBASE(PC),a6
  93.     move.l    (a6,d7.w),a6
  94.     jsr    (a6)
  95.     move.l    (sp)+,a6
  96.     rts
  97.  
  98.  
  99. InitDSP        ;INPUT (A0L)(SUPERSUPPORTTABLE_PTR)
  100.         ;OUTPUT (A0L)(PARAMETER GUI DEF_PTR)
  101.     lea.l    SUPERSTBASE(PC),a1
  102.     move.l    a0,(a1)
  103.  
  104.  
  105.     lea.l    Welcome_TXT(PC),a0
  106.     move.l    #SST_GFX_AssistText,d7
  107.     bsr    GoSST
  108.  
  109.     lea.l    Parameter_DEF(PC),a0
  110.     rts
  111.  
  112. Welcome_TXT    dc.b    "Welcome to DSP test",0
  113.  
  114. SUPERSTBASE    dc.l    0
  115.  
  116. CleanUpDSP    rts
  117.  
  118. GetDspTitle    ;OUTPUT (A0L)(DSPTitle_TXT)
  119.     lea.l    DSPTitle(PC),a0
  120.     rts
  121.  
  122. Counter    dc.l    0,0
  123.  
  124. ProcDsp        ;INPUT (D0W,A1L)(SAMPLE_NUMB,SAMPLECHUNK_PTR)
  125.     movem.l    d0-a6,-(sp)
  126.  
  127.     lea.l    Counter(PC),a0
  128.     addq.l    #1,(a0)
  129.  
  130.     movem.l    (sp)+,d0-a6
  131.     rts
  132.  
  133.     ;- GUI ------------------------------------------------------
  134.  
  135.     even
  136. Parameter_DEF
  137.     dc.b    0        ;END OF GUI DEF
  138.  
  139.     ;- TITLE ----------------------------------------------------
  140.  
  141.  
  142.         dc.b    "$VER: "
  143. DSPTitle    dc.b    "Test Dsp Plugin: Counter v1.0",0
  144.  
  145.  
  146.     END
  147.